﻿using System;
using System.Windows.Forms;
using DevExpress.LookAndFeel;
using DevExpress.XtraSplashScreen;
using System.Threading;
using EastFantasy.DnfAccountScan.Main.WebService.PublicService;

namespace EastFantasy.DnfAccountScan.Main
{
    public partial class Loading : SplashScreen
    {
        public Loading()
        {
            InitializeComponent();
        }

        #region Overrides

        public override void ProcessCommand(Enum cmd, object arg)
        {
            base.ProcessCommand(cmd, arg);
        }

        #endregion

        public enum SplashScreenCommand
        {
        }

        /// <summary>
        /// 设置进度条说明
        /// </summary>
        /// <param name="text"></param>
        public void SetText(string text)
        {
            labelControl2.Text = text;
        }

        private void Loading_Shown(object sender, EventArgs e)
        {

            //labelControl2.Text = "正在查询是否最新版本,请稍后...";
            //PublicService service = new PublicService();
            ////string newestVersion = service.GetLastVersion("DnfAccountScan");
            //string version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
            //if (newestVersion.Equals(version))
            //{
            //    labelControl2.Text = "当前版本是最新版本,正在启动,请稍后...";
            //}
            //else
            //{
            //    //MessageBox.Show("!!!");
            //}
        }

        private void Loading_Load(object sender, EventArgs e)
        {

        }
    }
}